import request from '@/utils/request'

// 获取房子接口
export const getHouse = () => request.get('/admin/houses')

// 发布房源接口
export const publishHouse = (data) => request.post('/user/houses', data)

// 查看发布房源信息
export const getPublishHouse = () => request.get('/user/houses')

// 查询房源信息接口
export const getHouseInfo = (id) => request.get('/area/map', {
  params: {
    id
  }
})

// 租房小组接口
export const rentHouseItem = (area) => request.get('/home/groups', {
  params: {
    area
  }
})

// 获取房屋的具体信息
export const getDetailInfo = (id) => request.get(`/houses/${id}`)

// 筛选接口
export const filterHouse = (cityId) => request.get('/houses', {
  params: {
    cityId
  }
})
// 租金筛选
export const filterCommunity = (area) => request.get('/houses', {
  params: {
    area
  }
})
